A continuation based runtime operates by scheduling non-blocking work items. Work items can be associated with a callback identifying where a procedure (activity) is to be resumed. In general, an activity represents a unit of executable code comprising multiple pulses of work. Unlike conventional computer software programs that sequentially process data using a stack/heap, a continuation based program communicates by registering continuations and scheduling activities as future work to perform tasks. The system is fractal, and by manipulating the scheduling of future work (child activities), a higher-level composite activity can define arbitrary control-flow constructs.
In many computing scenarios, a continuation based runtime has advantages over a sequential computer software programs. These include facilitating what is known as passivation, by which an activity can be persisted and resumed (rehydrated) in a different process/thread, including on an entirely different machine. However, continuation based programs are at present relatively unstructured, e.g., any part of a program can access any piece of data. As a result, a lot of state needs to be preserved to passivate an activity. Moreover, improper use of data in programs written for continuation based runtimes can cause numerous problems.